<<<<<<< HEAD
package com.wwx.web;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import com.alibaba.fastjson.JSON;
import com.opensymphony.xwork2.ActionSupport;
import com.wwx.entity.CartoonDO;
import com.wwx.service.CartoonService;
import com.wwx.service.impl.CartoonServiceImpl;
import com.wwx.util.Datatables;

public class CartoonAction  extends ActionSupport{
	private CartoonService cartoonService=new CartoonServiceImpl();
	private CartoonDO cartoonDO;
	private int start; 
	private int length; 
	private int draw;
	private String cartoonname;
	
	public String getCartoonname() {
		return cartoonname;
	}

	public void setCartoonname(String cartoonname) {
		this.cartoonname = cartoonname;
	}

	public CartoonDO getCartoonDO() {
		return cartoonDO;
	}

	public void setCartoonDO(CartoonDO cartoonDO) {
		this.cartoonDO = cartoonDO;
	}

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	public int getDraw() {
		return draw;
	}

	public void setDraw(int draw) {
		this.draw = draw;
	}

	public String execute() throws Exception {
		return super.execute();
	}
	
	public String doshowCartoonList() throws IOException {
		HttpServletResponse response=ServletActionContext.getResponse();
		Datatables dttbs=new Datatables();
		CartoonDO cartoonDO=new CartoonDO();
		cartoonDO.setCartoonname(cartoonname);
		dttbs.setData(cartoonService.selectAllCartoonPage(cartoonDO, start, length));
		dttbs.setDraw(draw);
		Integer sum=cartoonService.selectAllCartoonPageNumber(cartoonDO);
		dttbs.setRecordsFiltered(sum);
		dttbs.setRecordsTotal(sum);
		response.getWriter().print(JSON.toJSONString(dttbs));
		return null;
	}
	public String toshowCartoonList(){
		return "toshowCartoonList";
	}
	
}
=======
package com.wwx.web;

import java.io.IOException;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import com.alibaba.fastjson.JSON;
import com.opensymphony.xwork2.ActionSupport;
import com.wwx.entity.CartoonDO;
import com.wwx.service.CartoonService;
import com.wwx.service.impl.CartoonServiceImpl;
import com.wwx.util.Datatables;

public class CartoonAction  extends ActionSupport{
	private CartoonService cartoonService=new CartoonServiceImpl();
	private CartoonDO cartoonDO;
	private int start; 
	private int length; 
	private int draw;
	private String cartoonname;
	
	public String getCartoonname() {
		return cartoonname;
	}

	public void setCartoonname(String cartoonname) {
		this.cartoonname = cartoonname;
	}

	public CartoonDO getCartoonDO() {
		return cartoonDO;
	}

	public void setCartoonDO(CartoonDO cartoonDO) {
		this.cartoonDO = cartoonDO;
	}

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	public int getDraw() {
		return draw;
	}

	public void setDraw(int draw) {
		this.draw = draw;
	}

	public String execute() throws Exception {
		return super.execute();
	}
	
	public String doshowCartoonList() throws IOException {
		HttpServletResponse response=ServletActionContext.getResponse();
		Datatables dttbs=new Datatables();
		CartoonDO cartoonDO=new CartoonDO();
		cartoonDO.setCartoonname(cartoonname);
		dttbs.setData(cartoonService.selectAllCartoonPage(cartoonDO, start, length));
		dttbs.setDraw(draw);
		Integer sum=cartoonService.selectAllCartoonPageNumber(cartoonDO);
		dttbs.setRecordsFiltered(sum);
		dttbs.setRecordsTotal(sum);
		response.getWriter().print(JSON.toJSONString(dttbs));
		return null;
	}
	public String toshowCartoonList(){
		return "toshowCartoonList";
	}
	
}
>>>>>>> dev
